/*
-------------------------------------------------------------------
BIE is Copyright 2001-2003 Brunswick Corp.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/bie_license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
*/
package com.webdeninteractive.sbie;

import java.lang.ClassLoader;
import com.webdeninteractive.sbie.util.MappedObjectFactoryBase;
import com.webdeninteractive.sbie.ProtocolHandler;

/** 
 * Generator of ProtocolHandler implementations.
 * <p>
 * {@link ServiceFactory} contains general usage information.
 *
 * @see ProtocolHandler
 *
 * @version $Id: ProtocolHandlerFactory.java,v 1.1.1.1 2003/05/20 16:56:49 gdf Exp $
 */
public class ProtocolHandlerFactory extends MappedObjectFactoryBase {

    /** Sets the ClassLoader to use for instantiating new ProtocolHandlers. */
    public ProtocolHandlerFactory( ClassLoader loader ) {
        super(loader);
    }

    /** Create a new ProtocolHandler.  The implementation returned
     *  will be the one registered to the given name.
     */
    public ProtocolHandler makeProtocolHandler( String name )
        throws ClassNotFoundException, InstantiationException, IllegalAccessException
    {
        ProtocolHandler newsvc = (ProtocolHandler)this.makeMappedObject(name);
        return newsvc;
    }

}
